Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCS_Common: NACK a failed partial mission write #10108

Conversation

WickedShell
Copy link
Contributor

We should actually send an inband NACK rather then statustext for bad uploads. I left the status text in, but I'd actually like to see it come out. This is all @hamishwillee's fault ( mavlink/mavlink#1043 (comment) )

@hamishwillee
Copy link
Contributor

I accept full responsibility :-)

@hamishwillee
Copy link
Contributor

FWIW I would remove the STATUSTEXT in this instance because there is no context in which this information is useful to another GCS or system.

@WickedShell
Copy link
Contributor Author

WickedShell commented Dec 24, 2018

FWIW I would remove the STATUSTEXT in this instance because there is no context in which this information is useful to another GCS or system.

That's my preference as well, but wasn't confident if any current GCS's are using that since we weren't nack'ing before.

@hamishwillee
Copy link
Contributor

They'll be displaying it because it is a broadcast, but I don't see how they can use it. They'd have to be tracking the mission messages that aren't addressed to them to know what failed. ie irrelevant.

Possibly a bit of a hole in the protocol though that there is no broadcast notification to other systems that mission upload has completed and they might want to re-sync to the version on the vehicle.

@WickedShell WickedShell force-pushed the wickedshell/mission-write-partial-nack branch from a462a05 to 3eb4d36 Compare December 24, 2018 08:56
@peterbarker
Copy link
Contributor

I like the change, and it looks technically good.

However, I'm not sure we should remove the text message at this point.

Assuming no GCS out there is looking for the return mission message, we'll be removing any indication the user has that something has gone wrong.

Also - shouldn't we really send back an ack for success if we're going to send a nak for failure?

@WickedShell
Copy link
Contributor Author

Also - shouldn't we really send back an ack for success if we're going to send a nak for failure?

An ack is the vehicle asking you send it a mission item. (As far as I can tell anyways, we don't do any other kind of acking when you start a normal upload).

Assuming no GCS out there is looking for the return mission message, we'll be removing any indication the user has that something has gone wrong.

Yeah I'm willing to go with the majority view here, partial list hasn't been used by many people to the best of my knowledge which is part of why I was happy to just remove it. I haven't looked at the exsisting open impl's to see what they would do with the NACK. (Some might actually kill it correctly with this, others wouldn't)

@hamishwillee
Copy link
Contributor

Also - shouldn't we really send back an ack for success if we're going to send a nak for failure?

An ack is the vehicle asking you send it a mission item. (As far as I can tell anyways, we don't do any other kind of acking when you start a normal upload).

That is correct - or at least matches what is done for a normal upload. @peterbarker FYI I am in the process of documenting this - rendered here - @WickedShell is reviewing.

Assuming no GCS out there is looking for the return mission message, we'll be removing any indication the user has that something has gone wrong.

Good point. I'm changing my opinion to "leave the message in place too". The spec doesn't care - and this can be removed at some point in future.

Copy link
Contributor

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hamishwillee DEMANDS that the text message return. Or so I infer ;-)

@hamishwillee
Copy link
Contributor

@hamishwillee DEMANDS that the text message return. Or so I infer ;-)

:-)

Yes, I am writing much more of the MAVLink spec in terms of must vs should. It does sound demanding, but otherwise people assume that whatever they will do is fine.

Copy link
Member

@OXINARF OXINARF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be fair, on normal mission upload I don't see us sending any text message when an error occurs.

On the other hand, it is true that there was no NACK in this case so GCS could only rely on the text message to know if the error occurred - I doubt any did though: getting to this error would, in 99% of cases, mean the GCS implementation was wrong, so either the implementation has been fixed and this only matter for 1% of cases or the implementation is wrong and that's their fault 😛

@WickedShell WickedShell force-pushed the wickedshell/mission-write-partial-nack branch from 3eb4d36 to 5fc975e Compare January 23, 2019 06:22
@WickedShell WickedShell merged commit 753f360 into ArduPilot:master Jan 23, 2019
@WickedShell
Copy link
Contributor Author

Statustext is back as per dev call, tagged it with a hard date after which I can nuke it.

@peterbarker
Copy link
Contributor

peterbarker commented Jan 23, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants